package edu.yctc.origin.controller;

import javax.servlet.http.HttpSession;

import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;

import edu.yctc.origin.entity.UserDO;
import edu.yctc.origin.vo.MailCaptchaVO;
import edu.yctc.origin.vo.RetrievePasswordByMailVO;
import edu.yctc.origin.vo.UpdateMailVO;
import edu.yctc.origin.vo.UpdatePasswordVO;

/**
 * userController接口
 * 
 * @author 赵宜珺
 */
public interface UserController {

    /**
     * 展示登陆页
     * 
     * @param httpSession
     * @param model
     * @return
     */
    public String showSignin(HttpSession httpSession, Model model);

    /**
     * 登陆
     * 
     * @param userDO
     * @return
     */
    public String signin(UserDO userDO, HttpSession httpSession, Model model);

    /**
     * 展示用户主页
     * 
     * @param httpSession
     * @param model
     * @return
     */
    public String showUserHome(HttpSession httpSession, Model model);

    /**
     * 展示用户注销页
     * 
     * @return
     */
    public String showSignout();

    /**
     * 用户注销
     * 
     * @param httpSession
     * @return
     */
    public String signout(HttpSession httpSession);

    /**
     * 展示改密界面
     *
     * @return
     */
    String showUpdatePassword();

    /**
     * 有登录态的改密post请求
     *
     * @param updatePasswordVO
     * @param httpSession
     * @return
     */
    public String updatePassword(UpdatePasswordVO updatePasswordVO, HttpSession httpSession);

    /**
     * 展示找密界面
     *
     * @return
     */
    String showRetrievePassword();

    /**
     * 展示邮箱找密界面
     *
     * @return
     */
    String showRetrievePasswordByMail();

    /**
     * 邮箱找密
     *
     * @param retrievePasswordByMailVO
     * @param httpSession
     * @return
     */
    String retrievePasswordByMail(RetrievePasswordByMailVO retrievePasswordByMailVO, HttpSession httpSession);

    /**
     * 展示修改邮箱用户验证界面
     *
     * @param map
     * @param httpSession
     * @return
     */
    String showMailAuthentication(ModelMap map, HttpSession httpSession);

    /**
     * 修改邮箱用户验证post请求
     *
     * @param mailCaptchaVOO
     * @param httpSession
     * @return
     */
    String mailAuthentication(MailCaptchaVO mailCaptchaVOO, HttpSession httpSession);

    /**
     * 修改邮箱
     *
     * @param updateMailVO
     * @param httpSession
     * @return
     */
    String updateMail(UpdateMailVO updateMailVO, HttpSession httpSession);

    /**
     * 找密改密
     *
     * @param updatePasswordVO
     * @param httpSession
     * @return
     */
    String retrievePasswordStepC(UpdatePasswordVO updatePasswordVO, HttpSession httpSession);
}
